package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 归档策略业务对象
 *
 * @author ruoyi
 * @date 2024-12-06
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ArchiveStrategyBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 归档策略名称
     */
    @NotBlank(message = "归档策略名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 策略类型：1：压缩表归档、2：SQL文件归档
     */
    @NotNull(message = "策略类型：1：压缩表归档、2：SQL文件归档不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer strategyType;

    /**
     * 源表名
     */
    @NotBlank(message = "源表名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sourceTable;

    /**
     * 源表主键
     */
    @NotBlank(message = "源表主键不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sourcePk;

    /**
     * 目标表名
     */
    private String targetTable;

    /**
     * 目标表主键
     */
    private String targetPk;

    /**
     * 源表字段
     */
    private String sourceFields;

    /**
     * 目标表字段
     */
    private String targetFields;

    /**
     * 执行脚本
     */
    @NotBlank(message = "执行脚本不能为空", groups = { AddGroup.class, EditGroup.class })
    private String script;

    /**
     * 归档位置
     */
    @NotNull(message = "归档位置不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long locationId;

    /**
     * 发布状态：0未发布、1已发布
     */
    @NotNull(message = "发布状态：0未发布、1已发布不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long pubStatus;


}
